{% extends 'base.html' %}
{% load staticfiles %}
{% block content %}
    <div class="res-cons">
                        {% for message in messages.object_list %}
                        <article class="post">
                            <header>
                                <h1 class="post-title">
                                    <a href="{% url 'blog:message' message.id%}" title="{{message.name}}" target='_blank'>{{message.name}}</a>
                                </h1>
                            </header>
                            <date class="post-meta meta-date">
                                {{message.add_time|date:'y年m月d日'}}
                            </date>

                            <div class="post-meta meta-category">
                                |

                                    <a href='{% url 'blog:tag_message' message.tag.id%}' target='_blank'>{{message.tag.tag}}</a>
                            </div>
                            <div class="post-meta">
                            <span id="busuanzi_container_page_pv">
                                |本文总阅读量{{ message.click_nums }}次
                            </span>
                        </div>

                            <div class="post-content">
                               {{ message.desc }}
                            </div>
                            <p class="readmore clearfix"><a href="{% url 'blog:message' message.id%}">阅读全文</a></p>
                            <p style="border-bottom:1px solid #eee"></p>
                        </article>
                        {% endfor %}






<ol class="page-navigator">
                            {% if messages.has_previous %}
                                <li class="current"><a href="?{{ messages.previous_page_number.querystring }}">上一页</a></li>
                            {% endif %}
                            {% for page in messages.pages %}
                                {% if page %}
                                    {% ifequal page messages.number %}
                                        <li class="active"><a href="?{{ page.querystring }}">{{ page }}</a></li>
                                    {% else %}
                                        <li><a href="?{{ page.querystring }}" class="page">{{ page }}</a></li>
                                    {% endifequal %}
                                {% else %}
                                    <li class="none">...</li>
                                {% endif %}
                            {% endfor %}
                            {% if messages.has_next %}
                                <li class="next"><a href="?{{ messages.next_page_number.querystring }}">下一页</a></li>
                            {% endif %}
{#                            <li class="active"><a href="?page=1">1</a></li>#}
{#                            <li><a href="?page=2" class="page">2</a></li>#}
{#                            <li><a href="?page=3" class="page">3</a></li>#}
{#                    <li class="long"><a href="?page=2">下一页</a></li>#}
</ol>



                </div>

{% endblock %}